To prevent Opera from restarting and closing your incognito windows when switching between apps, you can try the following steps:
Disable Battery Optimization: Go to your device's settings and ensure that Opera is set to "No restrictions" in the battery optimization settings.
Keep Opera Active: Use the "Recent Apps" button to keep Opera running in the background instead of completely closing it.
Check Background Data Usage: Ensure that Opera has permission to use data in the background.
Use a Session Manager Extension: Consider using a session manager extension that can save and restore your open tabs and sessions.